using System;
using System.Collections;
using System.Collections.Specialized;
using System.Runtime.InteropServices;
namespace BMC.ARSystem
{
	[ClassInterface, Guid("8671cf4c-6094-4c84-96a4-0f0b66034f2c"), ProgId("BMC.ARSystem.WebServiceContainer")]
	public class WebServiceContainer : Container
	{
		private string _webServiceProperties;
		private ArrayList _operations;
		private string _xmlSchemaLocation;
		private ArrayList _mappings;
		private string _wsdl;
		private string _publishLocation;
		public string WebServiceProperties
		{
			get
			{
				return this._webServiceProperties;
			}
			set
			{
				this._webServiceProperties = value;
			}
		}
		public string XmlSchemaLocation
		{
			get
			{
				return this._xmlSchemaLocation;
			}
			set
			{
				this._xmlSchemaLocation = value;
			}
		}
		public string WSDL
		{
			get
			{
				return this._wsdl;
			}
			set
			{
				this._wsdl = value;
			}
		}
		public string PublishLocation
		{
			get
			{
				return this._publishLocation;
			}
			set
			{
				this._publishLocation = value;
			}
		}
		public ArrayList Operations
		{
			get
			{
				return this._operations;
			}
			set
			{
				this._operations = value;
			}
		}
		public ArrayList Mappings
		{
			get
			{
				return this._mappings;
			}
			set
			{
				this._mappings = value;
			}
		}
		public WebServiceContainer()
		{
			this.Initialize();
		}
		internal WebServiceContainer(object[] rawData, Server server) : base(rawData, server)
		{
			this.Initialize();
			this.LoadRefs(server);
		}
		private void Initialize()
		{
			this._operations = new ArrayList();
			this._mappings = new ArrayList();
			base.MembersModified = new BitVector32(base.MembersModified.get_Data() | 256);
		}
		internal void LoadRefs(Server server)
		{
			int i = 0;
			int count = this._references.get_Count();
			while (i < count)
			{
				Reference reference = this._references.get_Item(i) as Reference;
				if (reference != null)
				{
					ExternalReference externalReference = reference as ExternalReference;
					int referenceType = reference.ReferenceType;
					switch (referenceType)
					{
					case 32797:
						this._webServiceProperties = ((externalReference != null) ? externalReference.Value.ToString() : "");
						break;
					case 32798:
						this._operations.Add(externalReference.Value.ToString());
						break;
					case 32799:
						this._mappings.Add(externalReference.Value.ToString());
						break;
					case 32800:
						this._wsdl = ((externalReference != null) ? externalReference.Value.ToString() : "");
						break;
					case 32801:
						break;
					case 32802:
						this._publishLocation = ((externalReference != null) ? externalReference.Value.ToString() : "");
						break;
					default:
						if (referenceType == 32828)
						{
							this._xmlSchemaLocation = ((externalReference != null) ? externalReference.Value.ToString() : "");
						}
						break;
					}
				}
				i++;
			}
		}
		internal void SaveRefs(Server server)
		{
			base.MembersModified = new BitVector32(base.MembersModified.get_Data() | 256);
			this._references.Clear();
			base.AddItem(new ExternalReference(32797)
			{
				Value = this.WebServiceProperties
			});
			int i = 0;
			int count = this.Operations.get_Count();
			while (i < count)
			{
				base.AddItem(new ExternalReference(32798)
				{
					Value = this.Operations.get_Item(i)
				});
				i++;
			}
			base.AddItem(new ExternalReference(32828)
			{
				Value = this.XmlSchemaLocation
			});
			int j = 0;
			int count2 = this.Mappings.get_Count();
			while (j < count2)
			{
				base.AddItem(new ExternalReference(32799)
				{
					Value = this.Mappings.get_Item(j)
				});
				j++;
			}
			base.AddItem(new ExternalReference(32800)
			{
				Value = this.WSDL
			});
			base.AddItem(new ExternalReference(32802)
			{
				Value = this.PublishLocation
			});
		}
	}
}
